package com.jiajiankang.friends;

import java.util.List;
import java.util.Map;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ListView;
import android.widget.SimpleAdapter;

import com.jiajiankang.R;

public class publicshare extends Activity{
	private ListView listview;
	private SimpleAdapter adapter;
	private List<Map<String, Object>> data = null;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.publicshare);
		listview = (ListView) findViewById(R.id.publicshare_lv);
		data =PublicShare_myDataSource.getMaps();
		adapter = new SimpleAdapter(publicshare.this, data,
				R.layout.public_list, new String[] {"name","word","mypic" ,"goodpic"}, new int[] {
						R.id.publicshare_friendname,R.id.publicshare_talk,R.id.publicshare_ivsmall1,R.id.publicshare_iv1 });
		listview.setAdapter(adapter);
		Button button_back=(Button)findViewById(R.id.publicshare_back);
		button_back.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent=new Intent(publicshare.this,FriendsActivity.class);
				startActivity(intent);
			}
		});
		Button button_theme=(Button)findViewById(R.id.publicshare_theme);
		button_theme.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent=new Intent(publicshare.this,editshare.class);
				startActivity(intent);
			}
		});
	}

	
}
